package icu.lookyousmileface.matchlock;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @author starrysky
 * @title: FairAndUnFair
 * @projectName Juc_Pro
 * @description: 公平锁与非公平锁
 * @date 2021/1/308:47 下午
 */
public class FairAndUnFair {
    public static void main(String[] args) {
        /**
         * 公平锁
         */
        ReentrantLock reentrantLock1 = new ReentrantLock(true);
        /**
         * 非公平
         */
        ReentrantLock reentrantLock2 = new ReentrantLock();
    }
}
